package  
{
	import ca.jsbr.as2js_lib.display.canvas.CanvasStage;
	import ca.jsbr.as2js_lib.display.canvas.StageDescription;
	import ca.jsbr.as2js_lib.display.canvas.view.Image;
	import ca.jsbr.as2js_lib.display.canvas.view.SpriteView;
	import ca.jsbr.as2js_lib.event.BasicEvent;
	import ca.jsbr.as2js_lib.utils.assets.AssetsFactory;
	import ca.jsbr.canvaswar.CanvasWar;
	import flash.events.Event;
	/**
	 * ...
	 * @author jsbr [me@jsbr.ca]
	 *  
	 */

	public class Main extends CanvasStage 
	{
		
		public static const GAME:String = "game";
		public static const BENCHMARK:String = "benchmark";
		
		private var _war:CanvasWar;
		
		public var _startApp:String;
	
		public function Main() 
		{
			_startApp = GAME;
			
			super(new StageDescription("canvasStage",StageDescription.REPAINT_BROWSER));
			width = 800;
			height = 480;
			init();
		}
		
		private function init():void 
		{
			launch();
		}
		
		private function launch():void
		{
			switch (_startApp) 
			{
				case GAME:
					_war = new CanvasWar();
					addChild(_war);
					_war.init();
				break;
				case BENCHMARK:
					_war = new CanvasWar();
					addChild(_war);
					_war.init();
				break;
			}
		}
		
		
		
		
	}

}